package com.ruoyi.busy.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.busy.mapper.BusyApkeyMapper;
import com.ruoyi.busy.domain.BusyApkey;
import com.ruoyi.busy.service.IBusyApkeyService;

/**
 * 用户令牌Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-22
 */
@Service
public class BusyApkeyServiceImpl implements IBusyApkeyService 
{
    @Autowired
    private BusyApkeyMapper busyApkeyMapper;

    /**
     * 查询用户令牌
     * 
     * @param id 用户令牌主键
     * @return 用户令牌
     */
    @Override
    public BusyApkey selectBusyApkeyById(Long id)
    {
        return busyApkeyMapper.selectBusyApkeyById(id);
    }

    /**
     * 查询用户令牌列表
     * 
     * @param busyApkey 用户令牌
     * @return 用户令牌
     */
    @Override
    public List<BusyApkey> selectBusyApkeyList(BusyApkey busyApkey)
    {
        return busyApkeyMapper.selectBusyApkeyList(busyApkey);
    }

    /**
     * 新增用户令牌
     * 
     * @param busyApkey 用户令牌
     * @return 结果
     */
    @Override
    public int insertBusyApkey(BusyApkey busyApkey)
    {
        busyApkey.setCreateTime(DateUtils.getNowDate());
        return busyApkeyMapper.insertBusyApkey(busyApkey);
    }

    /**
     * 修改用户令牌
     * 
     * @param busyApkey 用户令牌
     * @return 结果
     */
    @Override
    public int updateBusyApkey(BusyApkey busyApkey)
    {
        return busyApkeyMapper.updateBusyApkey(busyApkey);
    }

    /**
     * 批量删除用户令牌
     * 
     * @param ids 需要删除的用户令牌主键
     * @return 结果
     */
    @Override
    public int deleteBusyApkeyByIds(Long[] ids)
    {
        return busyApkeyMapper.deleteBusyApkeyByIds(ids);
    }

    /**
     * 删除用户令牌信息
     * 
     * @param id 用户令牌主键
     * @return 结果
     */
    @Override
    public int deleteBusyApkeyById(Long id)
    {
        return busyApkeyMapper.deleteBusyApkeyById(id);
    }
}
